#!/bin/bash

echo "开始记录使用情况..."

for((i=0;i<100;i++))
do
    ((sec=${i}*10))
    echo "[${sec}]-----------------------------------------------------------"
    # top -b -n 1 | head -n 5
    # echo "-----------------------------------------------------------"
    # top -b -n 1 | grep ffmpeg
    # echo "-----------------------------------------------------------"
    # top -b -n 1 | grep ffmpeg | wc
    # echo "-----------------------------------------------------------"
    # free -h
    # echo "-----------------------------------------------------------"
    uptime
    free -m
    sleep 10
    echo "-----------------------------------------------------------"
done